/* 获取角色列表 */
import request from '@/utils/request'
export const getRoleLists = (params) => request({
  url: '/roles',
  params
})
/* 获取角色数量  */
export const getRoleCounts = () => request({
  url: '/roles/count'
})
/* 根据id获取指定角色 */
export const getRoleDetailById = (id) => request({
  url: '/roles/' + id
})
/* 编辑角色 */
export const editRole = (data) => request({
  url: '/roles/' + data.id,
  method: 'put',
  data
})
/* 删除角色 */
export const delRole = (id) => request({
  url: '/roles/' + id,
  method: 'delete'
})
/* 新建角色 */
export const addRole = (data) => request({
  url: '/roles/',
  method: 'post',
  data
})

